package com.eight.order.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eight.common.vo.Result;
import com.eight.order.pojo.Course;
import com.eight.order.pojo.Order;
import com.eight.order.service.CourseService;
import com.eight.order.vo.OrderVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @program: qy8-education
 * @description:
 * @author: 郑友民（1460115388@qq.com）
 * @create: 2023-05-26 20:17
 **/
@RestController
@RequestMapping("order/course")
@Api(tags = "订单课程接口类")
public class CourseController {
    @Autowired
    private CourseService courseService;
    @PostMapping("queryAllCourse/{courseId}")
    @ApiOperation("通过课程ID获取到课程")
    public Result queryAllCourse(@PathVariable String courseId) {
        List<Course> courses = courseService.queryAllCourse(courseId);
        return Result.success(courses);
    }
}

